<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class User_model  extends MY_Model  {

    public $table = 'users';

	public function __construct() {
		$this->class_name = get_class ( $this );
		parent::__construct( $this->class_name, $this->table );
		parent::init( $this->class_name, $this->table );
	}
	
	function getEmailAdresses($lang_id){
		$this->db->from($this->table);
		$this->db->select($this->table . '.user_email');
		
		$this->db->where($this->table . '.language_id',$lang_id);
		$this->db->or_where($this->table . '.type_id = 1');
		
		$query = $this->db->get();
		
		return $query->result();
	}
}